﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LSPmanager.ascx.cs" Inherits="administrator_usercontrol_LSPmanager" %>
<table style="width:100%;">
    <tr>
        <td colspan="3" align="center">
            Quản lý loại sản phẩm</td>
    </tr>
    
    <tr>
        <td colspan="3" align="center">
            <asp:Label ID="lbThongBao" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
        </td>
    </tr>
    
    <tr>
        <td colspan="3" align="center">
            <asp:GridView DataKeyNames="ID" ID="GridView1" runat="server" BackColor="#DEBA84" 
                BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                CellSpacing="2" ShowFooter="True" AllowPaging="True" 
                onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                onrowcancelingedit="GridView1_RowCancelingEdit" 
                onrowcommand="GridView1_RowCommand" onrowdatabound="GridView1_RowDataBound" onrowdeleting="GridView1_RowDeleting" 
                >
                <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                <Columns>
                   
                     <asp:TemplateField HeaderText="Mã loại"  HeaderStyle-HorizontalAlign="center"> 
                        <EditItemTemplate> 
                            <asp:TextBox ID="txtMa" runat="server" Text='<%# Bind("MaLoai") %>'></asp:TextBox> 
                        </EditItemTemplate> 
                        <ItemTemplate> 
                            <asp:Label ID="lblMa" runat="server" Text='<%# Bind("MaLoai") %>'></asp:Label> 
                    </ItemTemplate>
                    <FooterTemplate>
                            <asp:TextBox ID="txtMainsert" runat="server" Text=""></asp:TextBox>
 
                    </FooterTemplate> 
            </asp:TemplateField> 
                      <asp:TemplateField HeaderText="Tên loại"  HeaderStyle-HorizontalAlign="center"> 
                        <EditItemTemplate> 
                            <asp:TextBox ID="txtTen" runat="server" Text='<%# Bind("TenLoai") %>'></asp:TextBox> 
                        </EditItemTemplate> 
                        <ItemTemplate> 
                        <asp:Label ID="lblId" runat="server" Text='<%# Bind("TenLoai") %>'></asp:Label> 
                    </ItemTemplate> 
                    <FooterTemplate>
                            <asp:TextBox ID="txtTeninsert" runat="server" Text=""></asp:TextBox> 
                    </FooterTemplate> 
            </asp:TemplateField>
                   
                    <asp:TemplateField HeaderText="Sửa">
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ID="lkbSua" CommandName="Edit" CommandArgument='<%# Eval("ID") %>' CausesValidation="false">Sửa</asp:LinkButton>
                        </ItemTemplate>       
                         <EditItemTemplate> 
                            <asp:LinkButton ID="lbkUpdate" runat="server" CausesValidation="True" CommandName="Update" Text="Sửa"></asp:LinkButton> 
                            <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Thoát"></asp:LinkButton> 
                        </EditItemTemplate> 
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa">
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ID="lkbXoa" CommandName="Delete" CommandArgument='<%#Eval("ID") %>' CausesValidation="false">Xóa</asp:LinkButton>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="False" CommandName="Insert" Text="Thêm"></asp:LinkButton>
                        </FooterTemplate>
                        <HeaderStyle Width="50px" />
                    </asp:TemplateField>
                </Columns>
              
                <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
              
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>